#!/bin/bash
echo -e "                     \e[31mWelcome to use Stepping stones                          "
echo -e "\e[32m"
echo -e "#######################please choose you want to connect server##################
#	1: 10.2.11.207 (proxy01.test.com)                                               #
#	2: 10.2.11.206 (proxy02.test.com)                                               # 
#	3: 10.2.11.243 (node1.test.com)                                                 #
#       4: 10.2.11.233 (node2.test.com)                                                 #
#       5: 10.2.11.232 (node3.test.com)                                                 #
#       6: 10.2.11.219 (node4.test.com)                                                 # 
#       q: user local server
#       h: help
#########################################################################################
"'\033[37m\033[0m'
while [ True ]
  do
  read -p   "please choose you want to connect server:" -t 5 num
        case "$num" in
		1) ssh www@10.2.11.207 && echo "You select the current server."
		   ;;
                
		2) ssh www@10.2.11.206 && echo "You select the current server."
		   ;;
		3) ssh www@10.2.11.243 && echo "You select the current server."
		   ;;
		4) ssh www@10.2.11.233 && echo "You select the current server."
		   ;;
		5) ssh www@10.2.11.232 && echo "You select the current server."
		   ;;
		6) ssh www@10.2.11.219 && echo "You select the current server."
		   ;;
		q) exit
		   ;;
                h) echo "1: proxy01 2: proxy02 3:node1 4: node2 5: node3 6: node4"
		   ;;
                *) echo "Usage $0 <1|2|3|4|5|6|h>"
        esac
done
